package cn.yangsen.simplebeanmanager.bean.html;

import java.util.ArrayList;
import java.util.List;

import lombok.Getter;
import lombok.Setter;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;

@XStreamAlias("a")
public class A extends Element implements Cloneable
{
	@Setter
	@Getter
	@XStreamAsAttribute
	private String href;
	
	@Override
	public A clone()
	{
		A a = (A) super.clone();
		List<Element> elements = getElements();
		if(elements != null)
		{
			List<Element> list = new ArrayList<>(elements.size());
			a.setElements(list);
			for (Element element : elements)
			{
				list.add((Element) element.clone());
			}
		}
		
		return a;
	}
}
